<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--   display: block;
     block:块元素
     inline:行内元素
     inline-block:是块元素，但是可以内联，在一行
-->


    <style>
        div{
            width: 100px;
            height: 100px;
            border: 2px solid red;
            display: inline-block;
        }
        span{
            width: 100px;
            height: 100px;
            border:2px solid red;
            display: inline-block;
        }

    </style>
</head>
<body>
<div>
div元素
</div>
<span>span元素</span>
</body>
</html>